package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 用户表
 * @TableName user
 */
@TableName(value ="user")
public class User {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer uid;

    /**
     * 用户名称
     */
    private String userName;

    /**
     * 用户电话
     */
    private String userPath;

    /**
     * 用户密码
     */
    private String userPass;

    /**
     * id
     */
    public Integer getUid() {
        return uid;
    }

    /**
     * id
     */
    public void setUid(Integer uid) {
        this.uid = uid;
    }

    /**
     * 用户名称
     */
    public String getUserName() {
        return userName;
    }

    /**
     * 用户名称
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 用户电话
     */
    public String getUserPath() {
        return userPath;
    }

    /**
     * 用户电话
     */
    public void setUserPath(String userPath) {
        this.userPath = userPath;
    }

    /**
     * 用户密码
     */
    public String getUserPass() {
        return userPass;
    }

    /**
     * 用户密码
     */
    public void setUserPass(String userPass) {
        this.userPass = userPass;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        User other = (User) that;
        return (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getUserPath() == null ? other.getUserPath() == null : this.getUserPath().equals(other.getUserPath()))
            && (this.getUserPass() == null ? other.getUserPass() == null : this.getUserPass().equals(other.getUserPass()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getUserPath() == null) ? 0 : getUserPath().hashCode());
        result = prime * result + ((getUserPass() == null) ? 0 : getUserPass().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", uid=").append(uid);
        sb.append(", userName=").append(userName);
        sb.append(", userPath=").append(userPath);
        sb.append(", userPass=").append(userPass);
        sb.append("]");
        return sb.toString();
    }
}